package com.huluobo.day11_im.chat.presenter;

import com.hyphenate.chat.EMMessage;

import java.util.List;

public interface ChatContract {
    interface Presenter {
        void sendMessage(String content, String username);

        void addMessage(String username, List<EMMessage> messages);

        void loadMessage(String username);

        void loadMoreMessage(String username);
    }

    interface View {
        void onStartSendMessage();

        void onSendMessageSuccess();

        void onSendMessageFailed(String error);

        void onMessageLoaded();//读取历史消息,进入聊天界面就展示

        void onMoreMessageLoaded(int size);//加载更多历史消息,上划时加载
    }
}
